﻿Imports cp_negocio
Public Class frm_login
    'Creamos un objeto de tipo negocio
    Dim n As New negocio
    'Creamos flag nro 1
    Dim f1 As Boolean
    'Creamos objeto de tipo tablero principal
    Dim frm As Form
    Private Sub btn_login_Click(sender As Object, e As EventArgs) Handles btn_login.Click
        f1 = n.login(txt_user.Text, txt_pass.Text)
        If f1 = True Then
            frm = New frm_TableroPrincipal
            frm.Show()
            Me.Hide()
        Else
            MsgBox("Usuario inhabilitado o dado de baja", MsgBoxStyle.Information, "Error: Ex001")
        End If
    End Sub
    'Salir
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btn_salir.Click
        Me.Close()
    End Sub
End Class